package com.yn.iotxiao.sql.services.User;

import com.yn.iotxiao.sql.entity.User.TeacherInfo;
import com.yn.iotxiao.sql.mapper.TeacherMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherServiceImpl implements TeacherService{

    @Autowired
    TeacherMapper mapper;
    @Override
    public int insert(TeacherInfo teacherInfo) {
        return mapper.insert(teacherInfo);
    }

    @Override
    public int deleteWithKey(Object key) {
        return mapper.deleteWithKey(key);
    }

    @Override
    public TeacherInfo getWithKey(Object key) {
        return mapper.getWithKey(key);
    }

    @Override
    public List<TeacherInfo> getListPage(String searchKey, int page, int pageSize) {
        return mapper.getListPage(searchKey,page,pageSize);
    }

    @Override
    public int getTotal(String searchKey) {
        return mapper.getTotal(searchKey);
    }

    @Override
    public int batchInsert(List<TeacherInfo> list) {
        return mapper.batchInsert(list);
    }
}
